//
//  BroadcastDetailsCollectionViewCell.m
//  HimalayaMusic
//
//  Created by dllo on 16/1/8.
//  Copyright © 2016年 WXCLegendary. All rights reserved.
//

#import "BroadcastDetailsCollectionViewCell.h"

@implementation BroadcastDetailsCollectionViewCell

- (instancetype)initWithFrame:(CGRect)frame {
    
    self = [super initWithFrame:frame];
    if (self) {
        
        self.topImageView = [[UIImageView alloc] init];
        [self addSubview:_topImageView];
//        self.topImageView.backgroundColor = [UIColor redColor];
        
        
        self.label = [[UILabel alloc] init];
        [self addSubview:_label];
//        self.label.backgroundColor = [UIColor greenColor];
        self.label.font = [UIFont systemFontOfSize:12];
        self.label.textAlignment = NSTextAlignmentCenter;
    }
    
    return self;
    
}

- (void)applyLayoutAttributes:(UICollectionViewLayoutAttributes *)layoutAttributes {
    
    self.topImageView.frame = CGRectMake(10, 10, self.width - 20, self.height - 30);
    self.label.frame = CGRectMake(10, self.topImageView.origin.y + self.topImageView.height, self.topImageView.width, 20);
    
    
}

@end
